package com.danbay.cloud.lock.device.constant;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * @author yangyanchen on 2017/12/23
 *         Copyright © 2016 －2017 旦倍科技
 */
public class MessageInfoConstant {

    /**
     * 安全消息
     */
    public static final String MESSAGE_TYPE_SECURITY = "0";
    /**
     * 异常消息
     */
    public static final String MESSAGE_TYPE_EXCEPTION = "1";
    /**
     * 服务消息
     */
    public static final String MESSAGE_TYPE_SERVICE = "2";

    public static final Map<Integer,String> WARNINIG_MAP = Maps.newConcurrentMap();


    /**
     * 異常記錄類型鍵
     */
    public static final String KEY_LOCK_RECOVER="0";
    public static final String KEY_LOWELE_WARN="1";
    public static final String KEY_ELECTRIC_QUANTITY_RECOVER="2";
    public static final String KEY_DESTORY_WARN="3";
    public static final String KEY_PASSWORD_ERROR="4";
    public static final String KEY_LOCK_OFFLINE="5";
    public static final String KEY_UNKNOWN="6";

    /**
     * 账号日志
     */
    public static final String LOG_TYPE_ACCOUNT = "0";
    /**
     * 设备日志
     */
    public static final String LOG_TYPE_DEVICE = "1";

    /**
     * 设备操作日志
     */
    public static final String LOG_TYPE_DEVICE_OPERATION="1";
    /**
     * 开锁
     */
    public static final String LOG_TYPE_DEVICE_OPENDOOR="2";
    /**
     * 设备异常日志
     */
    public static final String LOG_TYPE_DEVICE_EXECEPTION="3";
    /**
     * 设备报警日志
     */
    public static final String LOG_TYPE_DEVICE_ALARM="4";


    static {
        WARNINIG_MAP.putIfAbsent(0x01, "密码输错过多报警");
        WARNINIG_MAP.putIfAbsent(0x02, "低电");
        WARNINIG_MAP.putIfAbsent(0x03, "防撬报警");
        WARNINIG_MAP.putIfAbsent(0x04, "斜舌报警");
    }


}
